package org.kjtc.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.kjtc.entity.BackLog;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2017/12/4 0004.
 */
@Mapper
public interface ReportFormMapper {

    @Select("select pd.ProductName,pv.ProductVersionName,bl.BacklogName,bl.ActualWorkDate\n" +
            ",bl.BacklogStatusName from product pd\n" +
            "LEFT JOIN productversion pv on pd.ProductID=pv.ProductID\n" +
            "LEFT JOIN module md ON md.ProductVersionID=pv.ProductVersionID\n" +
            "LEFT JOIN backlog bl ON bl.ModuleID=md.ModuleID \n" +
            "WHERE BacklogName!=\"\" and bl.UserID=#{userId} ")
    public List<Map<String,Object>> getAllBack(String userId);

    @SelectProvider(type =AllProvider.class, method = "doGetBackLogMsgOne")
    public List<BackLog> doGetBackLogMsgOne(BackLog backLog);

    @SelectProvider(type =AllProvider.class, method = "doGetBackLogMsgTwo")
    public List<BackLog> doGetBackLogMsgTwo(BackLog backLog);

}
